Don't use abbreviated ip subcommands -- these are not accepted by iproute2.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 30 Mar 2006 23:09:42 +0000 (00:09 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 30 Mar 2006 23:09:42 +0000 (00:09 +0100)
Closes bug #478.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/README.incompatibilities
tools/examples/vif-route

index 87b2dbd62ef392217b773dd053d22356afc8d240..bb067bd4198b69d0d8cc2d7a000751a9b988a9cf 100644 (file)
@@ -24,6 +24,13 @@ Gentoo doesn't have ifup/ifdown; appropriate alternatives are defined in
 xen-network-common.sh.
 
 
+ip
+--
+
+Newer ip commands (from iproute2) do not accept the abbreviated syntax "ip r a
+..." etc.  "ip route add ..." must be used instead.
+
+
 sed
 ---
 
index d733119d3058a0d4f6c97eb8b59832cde2133e27..1d5d299b607103058b3336fc8b3fe0aef2e8d14d 100755 (executable)
@@ -29,11 +29,11 @@ case "$command" in
     online)
         ifconfig ${vif} ${main_ip} netmask 255.255.255.255 up
         echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
-        ipcmd='a'
+        ipcmd='add'
         ;;
     offline)
         ifdown ${vif}
-        ipcmd='d'
+        ipcmd='del'
         ;;
 esac
 
@@ -41,7 +41,7 @@ if [ "${ip}" ] ; then
     # If we've been given a list of IP addresses, then add routes from dom0 to
     # the guest using those addresses.
     for addr in ${ip} ; do
-      ip r ${ipcmd} ${addr} dev ${vif} src ${main_ip}
+      ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip}
     done 
 fi